const { BrowserWindow } = require("@electron/remote");
const { ipcRenderer } = require("electron");


window.addEventListener("DOMContentLoaded", () => {
  const btn = document.querySelector("button");
  btn.addEventListener("click", () => {
    ipcRenderer.send("openWin2");
    localStorage.setItem("name", "waitfish");

    // let renderWindow =  new BrowserWindow({
    //   width: 800,
    //   height: 600
    // });
    // renderWindow.loadFile("./07-渲染进程互相通信/index.html");
    // renderWindow.on("close", () => renderWindow = null);
  });
});